// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Vuex from 'vuex'
import axios from 'axios'
import VueLazyload from 'vue-lazyload'  //图片懒加载
import inFiniteScroll from  'vue-infinite-scroll' //下拉数据刷新

//倒入格式化
import {currency} from './util/currency'  //有名字必须要加上括号
Vue.prototype.$http = axios
Vue.use(Vuex);
Vue.use(VueLazyload, {
  loading: 'static/loading-svg/loading-bars.svg',
  try: 3 // default 1
});

//定义全局过滤器
Vue.filter("currency",currency);
Vue.use(inFiniteScroll);
import './assets/css/base.css'
import './assets/css/checkout.css'
import './assets/css/product.css'

Vue.config.productionTip = false

/* eslint-disable no-new */

new Vue({
  el: '#app', //方式一
  router,
  components: { App },
  template: '<App/>'
 });

// new Vue({
//   // el: '#app', //方式一
//   router,
//    components: { App },
//    template: '<App/>'
// }).$mount("#app");  //方式二
